<!DOCTYPE html>
<html lang="en">
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Integrated Case Management System</title>
	<!-- ============================CSS link goes here============================ -->
	<!-- <link rel="stylesheet" href="css/globle.css"> -->
	<link rel="stylesheet" href="jquery-ui-1.10.3.flick/css/flick/jquery-ui-1.10.3.custom.css">
	<!-- Bootstrap -->
	<link rel="stylesheet" href="css/bootstrap.min.css" media="screen">
	<!-- Responsive -->
	<link href="css/bootstrap-responsive.css" rel="stylesheet">
	<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.3.0/buttons-min.css">
	<link rel="stylesheet" href="css/pure-skin-mine.css">
	<!-- <link rel="stylesheet" href="css/modal.css"> -->
	<link rel="stylesheet" href="css/decoration.css">
	<link rel="stylesheet" href="css/responsive.css">
	<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.0/css/font-awesome.css" rel="stylesheet">
	<link rel="stylesheet" href="css/progressBar.css">
	<link rel="stylesheet" href="js/jGrowl/jquery.jgrowl.css">
	<!-- ============================End of CSS links============================ -->

	<!-- ============================JS file goes here============================ -->
	<script src="jquery-ui-1.10.3.flick/js/jquery-1.9.1.js"></script>
	<script src="jquery-ui-1.10.3.flick/js/jquery-ui-1.10.3.custom.min.js"></script>
	<!-- Bootstrap -->
	<script src="js/bootstrap.min.js"></script>
	<script src="js/AI1JavaScript.js" ></script>
	<script src="js/autocomplete.js"></script>
	<script src="js/prePopulateText.js" ></script>
	<script src="js/jsButton.js" ></script>
	<script src="js/jsResponsive.js"></script>
	<script src="js/jquery.form.js"></script>
	<script src="js/dataExchangeAjax.js"></script>
	<script src="js/jqProgressBar.min.js"></script>
	<script src="js/progressBar.js"></script>
	<script src="js/jGrowl/jquery.jgrowl.js"></script>
	<!--script>
		jQuery(document).ready(function() {
			$('#lastUpdateDate').html(today);
		});
		var apiUrl = '/api/Products/GetTATOutput';

		function find() {
			var input = $('#caseDesc').val();
			$("#icon-loading").show();

			$.getJSON(apiUrl + '/?input=' + input)
			.done(function (data) {
				var objXHR = eval("(" + data + ")");
				$('#progressBarsDiv').show();
	            //progressBar1
	            progress(objXHR.LTA, $('#progressBar1'));
	            //progressBar2
	            progress(objXHR.NEA, $('#progressBar2'));
	            //progressBar3
	            progress(objXHR.PUB, $('#progressBar3'));
	            //Recommended Agency
	            var recomAgency = objXHR.RecomAgency;
	            $("#recomAgency").html(recomAgency);
	            $('#autoComp-agency').val(recomAgency);
	            //$('#tatOutput').html(objXHR.LTA);
	          	//$("#probOutput").show();
	          	$("#icon-loading").hide();
	          	progress(80, $('#progressBar'));
	          	$.jGrowl("Analysis completed!");
      		})
			.fail(function (jqXHR, textStatus, err) {
            //$('#tatOutput').val('Error: ' + err);
            $('#recomAgency').html('Error: ' + err);
            $("#icon-loading").hide();
            //$("#probOutput").show();
        });
		}
		function progress(percent, $element) {
			var progressBarWidth = percent * $element.width() / 100;
			$element.find('div').animate({ width: progressBarWidth }, 500).html(percent + "%&nbsp;");
		}
	</script-->

</head>
<body>
	<div id="clearScripts" class="prePopu" onclick="clearScripts()">
	</div>
	<header class="row-fluid main">
		<div class="row-fluid">
			<div class="span3 offset9">
				<img id="govLogo" src="images/gov-logo.png" alt="Singapore Government verified" ></img>
			</div>
		</div>
		<div class="row-fluid">
			<div class="span12">
				<img id="banner" src="" alt="Integrated Case Management System" class="span8" href="#">
			</div>
		</div>
		<div class="row-fluid">
			<nav class="navbar">
				<div class="navbar-inner">
					<ul class="nav nav-pills">
						<li><a href="inbox(1).html">Inbox</a></li>
						<li><a href="#">Reports</a></li>
						<li class="active"><a href="create-case(1).html">New Case</a></li>
					</ul>
				</div>
			</nav>
		</div>
		<div class="row-fluid">
			<h1 class="span4" onclick="textScripts()">Create New Case</h1>
			<hr class="thickLine">
		</div>
	</header>
	<div class="main container-fluid">

		<!-- <div class="row"> -->
		
		<div class="row-fluid">
			<div class="span6">
				<div class="row-fluid">	
					<div class="span4"><label for="#caseID">Case ID</label></div>
					<div class="span8">
						<span id="caseID"></span>
					</div>
				</div>
			</div>
		</div>
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="#agencyCaseID">Agency Case ID</label>
				</div>
				<div class="span8">
					<input type="text" name="agencyCaseID" id="agencyCaseID"/>
				</div>
			</div>
			<div class="span6">
				<div class="span4">
					<label for="caseStatus">Case Status</label>
				</div>
				<div class="span8">
					<select name="caseStatus" id="caseStatus">
						<option value="Open">Open</option>
						<option value="Pending">Pending</option>
						<option value="Closed">Closed</option>
					</select>
				</div>
			</div>			
		</div>
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="#fbDate">Incident Date</label>					
				</div>
				<div class="span8">
					<input type="text" class="datepicker" name="feedbackDate" id="fbDate" >
				</div>
			</div>
			<div class="span6">
				<div class="span4">
					<label for="#recDate">Received Date</label>
				</div>
				<div class="span8">
					<input type="text" class="datepicker" name="receivedDate" id="recDate">
				</div>
			</div>	
		</div>
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="#dueDate">Due Date</label>
				</div>
				<div class="span8">
					<input type="text" class="datepicker" name="dueDate" id="dueDate">
				</div>
			</div>
			<div class="span6" id="closedDateDiv">
				<div class="span4">
					<label for="#closedDate">Closed Date</label>
				</div>
				<div class="span8">
					<input type="text" class="datepicker" name="closedDate" id="closedDate">
				</div>
			</div>
		</div>
		<div class="row-fluid">
			<h2>Case Detail</h2>
			<hr class="slimLine">
		</div>
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">			
					<label for="sbjTitle">Subject Title</label>
				</div>
				<div class="span8">
					<input type="text" id="sbjTitle" class="tbx100" >
				</div>
			</div>
			<div class="span6"></div>
		</div>
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="#feedbackType">Feedback Type</label>
				</div>
				<div class="span8">
					<select name="feedbackType" id="feedbackType">
						<option value="Complaint">Complaint</option>
						<option value="Urgent">Urgent</option>
						<option value="Appeal">Appeal</option>
					</select>
				</div>
			</div>
			<div class="span6">
				<div class="span4">
					<label for="#channel">Channel</label>
				</div>
				<div class="span8">
					<select name="channel" id="channel">
						<option value="CRM">CRM</option>
						<option value="Phone call">Phone call</option>
						<option value="MobileApp">MobileApp</option>
					</select>
				</div>
			</div>
		</div>
		<div class="row-fluid">
			<div class="span2">
				<label for="caseDesc">Case Description</label>
			</div>
			<div class="span10" id="caseDescDiv">
				<textarea class="bigTextarea" name="caseDesc" id="caseDesc" placeholder="Enter case description here..."></textarea>
			</div>		
		</div>
		<div class="row-fluid">
			<!-- START: Text Analytic Widget (button and bars) -->
			<div class="span6">
				<div class="row-fluid">
					<div class="span4">
						<label>Suggested Agency</label>
					</div>
					<div class="span8">
						<button type="submit" class="pure-button pure-button-primary" id="btnAnalyzeDesc">Analyze Description&nbsp;<i id="icon-loading" class="fa fa-spinner fa-spin"></i></button>
					</div>
				</div>
				<div id="progressBarsDiv" class="row-fluid" style="margin-left:1%;margin-bottom:1%;">	
				<div class="span4">
						<span>Probability:</span>
					</div>
					<div class="span8">
						<div class="row-fluid">
							<div class="span3">
								<span>LTA</span>
							</div>
							<div class="span9">
								<div class="progressBar" id="progressBar1">
									<div></div>
								</div>
							</div>
						</div>
						<div class="row-fluid">
							<div class="span3">
								<span>NEA</span>
							</div>
							<div class="span9">
								<div class="progressBar" id="progressBar2">
									<div></div>
								</div>	
							</div>
						</div>
						<div class="row-fluid">
							<div class="span3">
								<span>PUB</span>
							</div>
							<div class="span9">
								<div class="progressBar" id="progressBar3">
									<div></div>
								</div>
							</div>
						</div>
						<div class="row-fluid">
							<p style="color: #666; font-family: Calibri; font-size: 1.2em; text-align: left; margin:0px;">This case most likely belongs to: <span id="recomAgency" style="color:#0D8EFC;font-weight:600"></span></p>
						</div>

					</div>
				</div>
			</div>	
			<!-- END: Text Analytic Widget (button and bars) -->	
			<div class="span6">
				<div class="span4">
					<label for="autoComp-agency">Agency</label>
				</div>
				<div class="span8">
					<select id="autoComp-agency" class="autoComp-agency">
						<option value="AVA">AVA</option>
						<option value="HDB">HDB </option>
						<option value="LTA">LTA</option>
						<option value="NEA">NEA</option>
						<option value="NPARKS">NPARKS</option>
						<option value="PUB">PUB</option>
						<option value="SPF">SPF</option>
					</select>
				</div>
			</div>
		</div>
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="autoComp">Category Search</label>
				</div>
				<div class="span8">	
					<!-- input for Category keywords. MUST USE 'autoComp' because the id in js is that -->
					<input type="text" class="autoComp tbx100" id="autoComp" placeholder="Enter keyword for categories...">
				</div>
			</div>
			<div class="span6"></div>
		</div>
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="autoComp-category">Category</label>
				</div>
				<div class="span8">
					<span id="autoComp-category" class="autoComp-category"></span>
				</div>
			</div>
			<div class="span6">
				<div class="span4">
					<label for="autoComp-subCate">Sub Category</label>
				</div>
				<div class="span8">
					<span id="autoComp-subCate" class="autoComp-subCate"></span>			
				</div>
			</div>
		</div>
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="address">Address</label>
				</div>
				<div class="span8">
					<textarea name="address" id="address" class="tbxAddress"></textarea>
				</div>
			</div>
			<div class="span6">
				<div class="span4">
					<label for="#postalCode">Postal Code</label>
				</div>
				<div class="span8">
					<input type="text" name="postalCode" id="postalCode"></input>			
				</div>
			</div>
		</div>
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="#lastUpdateAgency">Last Update Agency</label>
				</div>
				<div class="span8">
					<input type="text" name="lastUpdateAgency" id="lastUpdateAgency" readonly="true">
				</div>
			</div>
			<div class="span6">
				<div class="span4">
					<label for="#lastUpdateDate">Last Update Date</label>		
				</div>
				<div class="span8">	
					<input type="text" name="lastUpdateDateTime" id="lastUpdateDateTime" readonly="true">
				</div>
			</div>
		</div>
		<div class="rowfluid">
			<h2>Customer information</h2>
			<hr class="slimLine">
		</div>
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="#custName">Customer Name</label>
				</div>
				<div class="span8">
					<input type="text" name="custName" id="custName"></input>	
				</div>
			</div>
			<div class="span6">
				<div class="span4">
					<label for="#phone">Phone</label>
				</div>
				<div class="span8">
					<input type="text" name="phone" id="phone"></input>	
				</div>
			</div>
		</div>	
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="#NRIC">ID Number</label>
				</div>
				<div class="span8">	
					<input type="text" name="NRIC" id="NRIC"></input>	
				</div>
			</div>
			<div class="span6">
				<div class="span4">
					<label for="#IDType">ID Type</label>
				</div>
				<div class="span8">
					<select name="IDType" id="IDType">
						<option value="NRIC">NRIC</option>
						<option value="FIN">FIN</option>
						<option value="Passport">Passport</option>
					</select>
				</div>
			</div>
		</div>		
		<div class="row-fluid">
			<div class="span6">
				<div class="span4">
					<label for="#email">Email</label>
				</div>
				<div class="span8">	
					<input type="text" name="email" id="email"></input>	
				</div>
			</div>
		</div>

		<!--Child case part-->
		<div id="childCasesPart">
			<div class="row-fluid">
				<h2>Child Cases</h2>
				<hr class="slimLine">
			</div>
			<div class="row-fluid">
				<div id="childCaseTableWrap">
					<table id="childCaseTable" class="childTable">
						<thead>
							<tr>
								<th>Child Case ID</th>
								<th>Subject Title</th>
								<th>Category</th>
								<th>Case Status</th>
								<th>Routing Date</th>
								<th>Due Date</th>
								<th>Agency</th>
							</tr>
						</thead>
						<tbody>
							<!--child cases are added in here-->
						</tbody>
					</table>
				</div>
			</div>
		</div>

		<!-- joint agencies part-->
		<div id="jointAgencyPart">
			<div class="row-fluid">
				<h2 class="subTitle">Agencies Involved</h2>
				<hr class="slimLine">
			</div>
			<div id="jointAgencyTableWrap">
				<table id="jointAgencyTable" class="agencyTable">
					<thead>
						<tr>
							<th id="name" style="width:40%;">Agency Name</th>
							<th id="lead" style="width:20%;">Lead Agency</th>
							<th id="status" style="width:40%;">Status</th>
						</tr>
					</thead>
					<tbody>
						<!--child cases go here-->
					</tbody>
				</table>
			</div>
		</div>

		<!-- START: More Option panels -->
		




		<!-- END: More Option panels -->

		<!-- buttons -->
		<div class="row-fluid" style="min-height:20px;"></div>
		<div class="row-fluid">
			<div class="span4 offset8">
				<button type="submit" class="pure-button pure-button-primary" style="float:right;margin-left:15px;">Confirm</button>
				<!-- <button type="submit" class="pure-button pure-button-secondary" style="float:right;margin-left:15px;">More Options</button> -->
			</div>
		</div>
	</div>
<div style="height:100px;"></div>
	<footer class="row-fluid">
		<span id="copyright">&copy; Copyright 2013, All rights Reserved.</span>
		<span id="PSTCD">Privacy Statement | Terms &amp; Conditions | Disclaimer</span>
	</footer>

</body>
</html>